1. Field of the Invention
The present invention relates to a data processing apparatus and method, and in particular to use of a data engine within such a data processing apparatus.
2. Background of the Invention
In a data processing apparatus having a main processing unit, it is known to provide a data engine, sometimes also referred to as a loosely-coupled coprocessor (loosely coupled in the sense that it resides externally to the main processing unit and that synchronisation between the data engine and the main processing unit only takes place on a process or task level), which can be used to handle certain data processing tasks on behalf of the main processing unit. This can lead to various improvements with respect to a data processing apparatus where all of the tasks are handled by the main processing unit, these improvements being for example one or more of an increase in speed of execution, a reduction in power consumption for a given set of tasks, or a decrease in the total silicon area required to support the required functionality.
One example of such a data engine is a Digital Signal Processor (DSP), which can be considered to be a processing unit optimised for handling specific processing tasks and which typically has its own dedicated resources, for example its own interrupt controller, its own Direct Memory Access (DMA) logic, etc. Whilst the use of such DSPs can be very effective in improving performance of the data processing apparatus, they are expensive to provide within a data processing apparatus, due to the need to provide the DSP with all of the dedicated resources needed to enable the DSP to perform the required processing task on behalf of the main processing unit.
An alternative to such DSPs is to provide a data engine of the type that has no local resources dedicated to it, such a data engine acting as a pure slave device for the main processing unit. In such examples, the main processing unit dispatches a particular task to the data engine, along with all the data required by the data engine to perform that task, and subsequently receives a confirmation signal from the data engine when that task has been completed. On receipt of such a confirmation signal, a further task can then be dispatched from the main processing unit to the data engine. Whilst such a data engine can be significantly cheaper to implement than the earlier-mentioned DSP, due to the fact that it requires no local resources to be provided for the data engine, there is significant overhead on behalf of the main processing unit in handling the allocation of individual tasks to the data engine, and ensuring that the data engine is provided with all the data it needs to perform the task, thereby resulting in significant global system activity to support the data engine's activities. This not only deteriorates performance in terms of compute cycles and power consumption, but also often results in the need to significantly re-write existing software to enable that software to be run on a data processing apparatus including such a data engine, which is clearly undesirable.
A middle ground approach that has been developed between the above described DSP approach, where all resources required by the DSP are provided locally to the DSP and dedicated to the DSP, and the data engine approach where the data engine has no local/dedicated resources, is to provide a data engine which can have access to certain resources, but those resources are shared with other elements of the data processing apparatus. Hence, whilst those resources, or portions of those resources, may be dedicated to the data engine for a particular session (a session typically containing a group of tasks to be performed), those resources can be re-allocated in a subsequent session to other elements of the data processing apparatus.
When providing a data engine with access to certain shared resources, a subsystem layer can be provided between the main processing unit and the data engine to provide some decoupling of the data engine from the main processing unit. The main processing unit can then allocate a group of tasks to the data engine, and the subsystem then handles the dispatch of each individual task to the data engine for handling. The subsystem can also cause the allocated shared resources to be accessed as and when required to enable the data engine to perform the required tasks. In such an approach, the subsystem adopts a master role with respect to the data engine, and the data engine again acts as a pure slave. Whilst such an approach can remove some of the task management complexities from the main processing unit, by allowing the main processing unit to dispatch a group of tasks to the subsystem for handling by the data engine, it still will often require a significant re-writing of existing software to enable that software to execute on the data processing apparatus. In particular, when the software implementing a particular task was written, it may have been assumed that such a task would be performed by a processing unit that was able to exhibit some master functionality, and hence could initiate certain events. However, as discussed above, when a task is allocated to the data engine by the subsystem, the data engine itself acts as a pure slave device, and cannot initiate any events.
A further problem with the approach described above is that it presents three different program points of view within the system. In particular, in addition to requiring the main processing unit and the data engine to be programmed, the subsystem also requires some programming, since it acts like a local processing unit in its own right, due to the requirement for it to manage the dispatch of individual tasks to the data engine, and manage the access to the shared resources as required in order to ensure that the data engine is provided with all the data it requires to perform such tasks. Further, it does not help in reducing global system activity, since use of the shared resources requires significant communication with the main processing unit.
Accordingly, it would be desirable to provide an improved data engine for use within a data processing apparatus, that can provide significant cost savings with respect to the use of a DSP, and which can reduce the risks of having to significantly re-write software to enable it to run on a system including that data engine.